.class public Lcom/zuiapps/library/db/UpgradeDBUtil;
.super Ljava/lang/Object;
.source "UpgradeDBUtil.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "UpgradeDBUtil"

.field private static dbUtil:Lcom/zuiapps/library/db/UpgradeDBUtil;


# instance fields
.field private final IGNORE_VERSION_CODE:Ljava/lang/String;

.field private context:Landroid/content/Context;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 19
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 17
    const-string v0, "ignore_version_code"

    iput-object v0, p0, Lcom/zuiapps/library/db/UpgradeDBUtil;->IGNORE_VERSION_CODE:Ljava/lang/String;

    .line 20
    iput-object p1, p0, Lcom/zuiapps/library/db/UpgradeDBUtil;->context:Landroid/content/Context;

    .line 21
    return-void
.end method

.method public static getInstance(Landroid/content/Context;)Lcom/zuiapps/library/db/UpgradeDBUtil;
    .registers 2
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 24
    sget-object v0, Lcom/zuiapps/library/db/UpgradeDBUtil;->dbUtil:Lcom/zuiapps/library/db/UpgradeDBUtil;

    if-nez v0, :cond_b

    .line 25
    new-instance v0, Lcom/zuiapps/library/db/UpgradeDBUtil;

    invoke-direct {v0, p0}, Lcom/zuiapps/library/db/UpgradeDBUtil;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/zuiapps/library/db/UpgradeDBUtil;->dbUtil:Lcom/zuiapps/library/db/UpgradeDBUtil;

    .line 27
    :cond_b
    sget-object v0, Lcom/zuiapps/library/db/UpgradeDBUtil;->dbUtil:Lcom/zuiapps/library/db/UpgradeDBUtil;

    return-object v0
.end method


# virtual methods
.method public getIgnoreVersionCode()I
    .registers 4

    .prologue
    .line 35
    iget-object v0, p0, Lcom/zuiapps/library/db/UpgradeDBUtil;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/zuiapps/library/db/UpgradeSharePrefHelper;->newInstance(Landroid/content/Context;)Lcom/zuiapps/library/db/UpgradeSharePrefHelper;

    move-result-object v0

    const-string v1, "ignore_version_code"

    const/4 v2, -0x1

    invoke-virtual {v0, v1, v2}, Lcom/zuiapps/library/db/UpgradeSharePrefHelper;->getPref(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public setIgnoreVersionCode(I)V
    .registers 4
    .param p1, "versionCode"    # I

    .prologue
    .line 31
    iget-object v0, p0, Lcom/zuiapps/library/db/UpgradeDBUtil;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/zuiapps/library/db/UpgradeSharePrefHelper;->newInstance(Landroid/content/Context;)Lcom/zuiapps/library/db/UpgradeSharePrefHelper;

    move-result-object v0

    const-string v1, "ignore_version_code"

    invoke-virtual {v0, v1, p1}, Lcom/zuiapps/library/db/UpgradeSharePrefHelper;->setPref(Ljava/lang/String;I)V

    .line 32
    return-void
.end method
